package com.ruoyi.bearing.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.bearing.mapper.ComponentTypesMapper;
import com.ruoyi.bearing.domain.ComponentTypes;
import com.ruoyi.bearing.service.IComponentTypesService;

/**
 * 元器件类型管理Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-04-01
 */
@Service
public class ComponentTypesServiceImpl implements IComponentTypesService 
{
    @Autowired
    private ComponentTypesMapper componentTypesMapper;

    /**
     * 查询元器件类型管理
     * 
     * @param typeId 元器件类型管理主键
     * @return 元器件类型管理
     */
    @Override
    public ComponentTypes selectComponentTypesByTypeId(Long typeId)
    {
        return componentTypesMapper.selectComponentTypesByTypeId(typeId);
    }

    /**
     * 查询元器件类型管理列表
     * 
     * @param componentTypes 元器件类型管理
     * @return 元器件类型管理
     */
    @Override
    public List<ComponentTypes> selectComponentTypesList(ComponentTypes componentTypes)
    {
        return componentTypesMapper.selectComponentTypesList(componentTypes);
    }

    /**
     * 新增元器件类型管理
     * 
     * @param componentTypes 元器件类型管理
     * @return 结果
     */
    @Override
    public int insertComponentTypes(ComponentTypes componentTypes)
    {
        return componentTypesMapper.insertComponentTypes(componentTypes);
    }

    /**
     * 修改元器件类型管理
     * 
     * @param componentTypes 元器件类型管理
     * @return 结果
     */
    @Override
    public int updateComponentTypes(ComponentTypes componentTypes)
    {
        return componentTypesMapper.updateComponentTypes(componentTypes);
    }

    /**
     * 批量删除元器件类型管理
     * 
     * @param typeIds 需要删除的元器件类型管理主键
     * @return 结果
     */
    @Override
    public int deleteComponentTypesByTypeIds(Long[] typeIds)
    {
        return componentTypesMapper.deleteComponentTypesByTypeIds(typeIds);
    }

    /**
     * 删除元器件类型管理信息
     * 
     * @param typeId 元器件类型管理主键
     * @return 结果
     */
    @Override
    public int deleteComponentTypesByTypeId(Long typeId)
    {
        return componentTypesMapper.deleteComponentTypesByTypeId(typeId);
    }
}
